package api.beans;

/**
 * 传感器温度读书的数据类型
 */
public class SensorReading2 {

    //属性：id，统计数，温度（平均数）
    public String id;
    public Long cnt;
    public Double avgTemp;

    public SensorReading2() {}

    public SensorReading2(String id, Long timestamp, Double temperature) {
        this.id = id;
        this.cnt = timestamp;
        this.avgTemp = temperature;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long getTimestamp() {
        return cnt;
    }

    public void setTimestamp(Long timestamp) {
        this.cnt = timestamp;
    }

    public Double getTemperature() {
        return avgTemp;
    }

    public void setTemperature(Double temperature) {
        this.avgTemp = temperature;
    }

    @Override
    public String toString() {
        return "SensorReading2{" +
                "id='" + id + '\'' +
                ", cnt=" + cnt +
                ", avgTemp=" + avgTemp +
                '}';
    }
}
